package com.aizuda.boot.modules.business.department.service;

import com.aizuda.boot.modules.business.department.domain.response.DepartmentDetailVO;
import com.aizuda.boot.modules.business.department.domain.response.DepartmentInfoDTO;
import com.aizuda.boot.modules.business.department.domain.response.DepartmentTreeVO;
import com.aizuda.boot.modules.business.permission.domain.entity.DepartmentEntity;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
import java.util.Map;

/**
 * @author sangyirong
 * @version 1.0
 * @date 2025/5/15
 */
public interface DepartmentService extends IService<DepartmentEntity> {
    
    /**
     * 获取部门树形结构
     *
     * @return 部门树形结构列表
     */
    List<DepartmentTreeVO> getDepartmentTree();

    /**
     * 根据父节点ID获取部门树形结构
     *
     * @param parentNodeId 父节点ID，如果为null则获取所有顶级部门
     * @return 部门树形结构列表
     */
    List<DepartmentTreeVO> getDepartmentTreeByParentId(Long parentNodeId);
    /**
     * 获取部门详细信息，包括子部门和员工信息
     *
     * @param departmentId 部门ID
     * @return 部门详细信息
     */
    DepartmentDetailVO getDepartmentDetail(Long departmentId);

    /**
     * 获取员工所属部门信息
     *
     * @param employeeId 员工ID
     * @return 员工所属部门信息
     */
    DepartmentInfoDTO getEmployeeMainDepartment(Long employeeId);

    /**
     * 根据租户ID获取部门树形结构
     * @param tenantId
     * @return
     */
    DepartmentTreeVO getDepartmentTreeByTenant(Integer tenantId);

    /**
     * 获取所有部门名称
     * @return
     */
    Map<Long, String> getAllDepartmentNames();
}
